package com.hhb.juc;

public class Test04 {
    public static void main(String[] args) {
        Ticket ticket = new Ticket();

        new Thread(()->{ for (int i = 0; i < 40; i++) {
            ticket.saleTicket();
        }
        },"小A").start();
        /*new Thread(()->{ for (int i = 0; i < 40; i++) {
            ticket.saleTicket();
        }
        },"小B").start();
        new Thread(()->{ for (int i = 0; i < 40; i++) {
            ticket.saleTicket();
        }
        },"小C").start();*/



    }
}
